add stock indent, unindent I would have prefered outdent, but
authorJody Goldberg <jody@gnome.org>
Tue, 20 Jan 2004 16:32:54 +0000 (16:32 +0000)
committerJody Goldberg <jody@src.gnome.org>
Tue, 20 Jan 2004 16:32:54 +0000 (16:32 +0000)
2004-01-05  Jody Goldberg <jody@gnome.org>

* gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
  I would have prefered outdent, but compatibility seems more
  important.
* gtk/gtkstock.c (builtin_items) : ditto.
* gtk/gtkstock.h : ditto.
* gtk/stock-icons/Makefile.am : ditto.
* gtk/stock-icons/stock_text_indent_16.png :
* gtk/stock-icons/stock_text_indent_24.png :
* gtk/stock-icons/stock_text_unindent_16.png :
* gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme

2003-12-18  Jody Goldberg <jody@gnome.org>

* gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
  to ensure that the base hicolor theme is installed.  Silently
  failing to produce icons that apps assume exist in the theme seems
  like a bad idea.

14 files changed:
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkiconfactory.c
gtk/gtkicontheme.c
gtk/gtkstock.c
gtk/gtkstock.h
gtk/stock-icons/Makefile.am
gtk/stock-icons/stock_text_indent_16.png [new file with mode: 0644]
gtk/stock-icons/stock_text_indent_24.png [new file with mode: 0644]
gtk/stock-icons/stock_text_unindent_16.png [new file with mode: 0644]
gtk/stock-icons/stock_text_unindent_24.png [new file with mode: 0644]

index cca738a2f0991d6ce83968ffd1ada54e85cc6a79..dce4593625857819d91468921971a2c92b6ab982 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -508,6 +508,19 @@ Wed Jan  7 02:50:55 2004  Matthias Clasen  <maclas@gmx.de>
        * gdk/gdkimage.h: Added <public> documentation to the struct, as
        suggested by Owen Taylor.
 
+2004-01-05  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
+         I would have prefered outdent, but compatibility seems more
+         important.
+       * gtk/gtkstock.c (builtin_items) : ditto.
+       * gtk/gtkstock.h : ditto.
+       * gtk/stock-icons/Makefile.am : ditto.
+       * gtk/stock-icons/stock_text_indent_16.png :
+       * gtk/stock-icons/stock_text_indent_24.png :
+       * gtk/stock-icons/stock_text_unindent_16.png :
+       * gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
+
 Sun Jan  4 15:29:04 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkradiotoolbutton.[ch]
@@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate()
        instead of gtk_action_activate().
 
+2003-12-18  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
+         to ensure that the base hicolor theme is installed.  Silently
+         failing to produce icons that apps assume exist in the theme seems
+         like a bad idea.
+
 Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #110249, reworked patch from Joshua N Pritikin.
index cca738a2f0991d6ce83968ffd1ada54e85cc6a79..dce4593625857819d91468921971a2c92b6ab982 100644 (file)
@@ -508,6 +508,19 @@ Wed Jan  7 02:50:55 2004  Matthias Clasen  <maclas@gmx.de>
        * gdk/gdkimage.h: Added <public> documentation to the struct, as
        suggested by Owen Taylor.
 
+2004-01-05  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
+         I would have prefered outdent, but compatibility seems more
+         important.
+       * gtk/gtkstock.c (builtin_items) : ditto.
+       * gtk/gtkstock.h : ditto.
+       * gtk/stock-icons/Makefile.am : ditto.
+       * gtk/stock-icons/stock_text_indent_16.png :
+       * gtk/stock-icons/stock_text_indent_24.png :
+       * gtk/stock-icons/stock_text_unindent_16.png :
+       * gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
+
 Sun Jan  4 15:29:04 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkradiotoolbutton.[ch]
@@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate()
        instead of gtk_action_activate().
 
+2003-12-18  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
+         to ensure that the base hicolor theme is installed.  Silently
+         failing to produce icons that apps assume exist in the theme seems
+         like a bad idea.
+
 Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #110249, reworked patch from Joshua N Pritikin.
index cca738a2f0991d6ce83968ffd1ada54e85cc6a79..dce4593625857819d91468921971a2c92b6ab982 100644 (file)
@@ -508,6 +508,19 @@ Wed Jan  7 02:50:55 2004  Matthias Clasen  <maclas@gmx.de>
        * gdk/gdkimage.h: Added <public> documentation to the struct, as
        suggested by Owen Taylor.
 
+2004-01-05  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
+         I would have prefered outdent, but compatibility seems more
+         important.
+       * gtk/gtkstock.c (builtin_items) : ditto.
+       * gtk/gtkstock.h : ditto.
+       * gtk/stock-icons/Makefile.am : ditto.
+       * gtk/stock-icons/stock_text_indent_16.png :
+       * gtk/stock-icons/stock_text_indent_24.png :
+       * gtk/stock-icons/stock_text_unindent_16.png :
+       * gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
+
 Sun Jan  4 15:29:04 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkradiotoolbutton.[ch]
@@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate()
        instead of gtk_action_activate().
 
+2003-12-18  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
+         to ensure that the base hicolor theme is installed.  Silently
+         failing to produce icons that apps assume exist in the theme seems
+         like a bad idea.
+
 Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #110249, reworked patch from Joshua N Pritikin.
index cca738a2f0991d6ce83968ffd1ada54e85cc6a79..dce4593625857819d91468921971a2c92b6ab982 100644 (file)
@@ -508,6 +508,19 @@ Wed Jan  7 02:50:55 2004  Matthias Clasen  <maclas@gmx.de>
        * gdk/gdkimage.h: Added <public> documentation to the struct, as
        suggested by Owen Taylor.
 
+2004-01-05  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
+         I would have prefered outdent, but compatibility seems more
+         important.
+       * gtk/gtkstock.c (builtin_items) : ditto.
+       * gtk/gtkstock.h : ditto.
+       * gtk/stock-icons/Makefile.am : ditto.
+       * gtk/stock-icons/stock_text_indent_16.png :
+       * gtk/stock-icons/stock_text_indent_24.png :
+       * gtk/stock-icons/stock_text_unindent_16.png :
+       * gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
+
 Sun Jan  4 15:29:04 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkradiotoolbutton.[ch]
@@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate()
        instead of gtk_action_activate().
 
+2003-12-18  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
+         to ensure that the base hicolor theme is installed.  Silently
+         failing to produce icons that apps assume exist in the theme seems
+         like a bad idea.
+
 Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #110249, reworked patch from Joshua N Pritikin.
index cca738a2f0991d6ce83968ffd1ada54e85cc6a79..dce4593625857819d91468921971a2c92b6ab982 100644 (file)
@@ -508,6 +508,19 @@ Wed Jan  7 02:50:55 2004  Matthias Clasen  <maclas@gmx.de>
        * gdk/gdkimage.h: Added <public> documentation to the struct, as
        suggested by Owen Taylor.
 
+2004-01-05  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkiconfactory.c (get_default_icons) : add stock indent, unindent
+         I would have prefered outdent, but compatibility seems more
+         important.
+       * gtk/gtkstock.c (builtin_items) : ditto.
+       * gtk/gtkstock.h : ditto.
+       * gtk/stock-icons/Makefile.am : ditto.
+       * gtk/stock-icons/stock_text_indent_16.png :
+       * gtk/stock-icons/stock_text_indent_24.png :
+       * gtk/stock-icons/stock_text_unindent_16.png :
+       * gtk/stock-icons/stock_text_unindent_24.png : from gnome-icon-theme
+
 Sun Jan  4 15:29:04 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkradiotoolbutton.[ch]
@@ -787,6 +800,13 @@ Fri Dec 19 01:35:34 2003  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtktoggleaction.c: Always use _gtk_action_emit_activate()
        instead of gtk_action_activate().
 
+2003-12-18  Jody Goldberg <jody@gnome.org>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_lookup_icon)) : Add a sanity test
+         to ensure that the base hicolor theme is installed.  Silently
+         failing to produce icons that apps assume exist in the theme seems
+         like a bad idea.
+
 Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #110249, reworked patch from Joshua N Pritikin.
index 504ce813500b941e3af1561d74b62088288c2d9d..240ade234eb36a6e51933a6dd5a69166f487fc4d 100644 (file)
@@ -662,6 +662,14 @@ get_default_icons (GtkIconFactory *factory)
             16, stock_text_underline_16,
             24, stock_text_underline_24);
 
+  add_icon2 (factory, GTK_STOCK_INDENT,
+            16, stock_text_indent_16,
+            24, stock_text_indent_24);
+
+  add_icon2 (factory, GTK_STOCK_UNINDENT,
+            16, stock_text_unindent_16,
+            24, stock_text_unindent_24);
+
   add_icon2 (factory, GTK_STOCK_GOTO_TOP,
             16, stock_top_16,
             24, stock_top_24);
index bd0dc97e68ca21cd5632d72529291596388e4d6b..85752d7d746b7f056168af3bc1ed9a87dce93616 100644 (file)
@@ -630,8 +630,8 @@ gtk_icon_theme_finalize (GObject *object)
  * the right name is found directly in one of the elements of
  * @path, then that image will be used for the icon name.
  * (This is legacy feature, and new icons should be put
- * into the default icon theme, which is called "hicolor", rather than
- * directly on the icon path.)
+ * into the default icon theme, which is called DEFAULT_THEME_NAME,
+ * rather than directly on the icon path.)
  *
  * Since: 2.4
  **/
@@ -1157,6 +1157,36 @@ gtk_icon_theme_lookup_icon (GtkIconTheme       *icon_theme,
  out:
   if (icon_info)
     icon_info->desired_size = size;
+  else
+    {
+      static gboolean check_for_default_theme = TRUE;
+      char *default_theme_path;
+      gboolean found = FALSE;
+      unsigned i;
+
+      if (check_for_default_theme)
+       {
+         check_for_default_theme = FALSE;
+
+         for (i = 0; !found && i < priv->search_path_len; i++)
+           {
+             default_theme_path = g_build_filename (priv->search_path[i],
+                                                    DEFAULT_THEME_NAME,
+                                                    "index.theme",
+                                                    NULL);
+             found = g_file_test (default_theme_path, G_FILE_TEST_IS_REGULAR);
+             g_free (default_theme_path);
+           }
+         if (!found)
+           {
+             g_warning (_("Could not find the icon '%s'.  The '" DEFAULT_THEME_NAME "' theme\n"
+                          "was not found either, perhaps you need to install it.\n"
+                          "You can get a copy from :\n"
+                          "\thttp://freedesktop.org/Software/icon-theme/releases"),
+                        icon_name);
+           }
+       }
+    }
 
   return icon_info;
 }
index cd5caed17aadd98f69bf951ccfef4b5b9b233577..7b00641f67e9b801032cdd04652eea3a4d17a805 100644 (file)
@@ -298,6 +298,8 @@ static const GtkStockItem builtin_items [] =
   { GTK_STOCK_HARDDISK, N_("_Harddisk"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_HELP, N_("_Help"), GDK_CONTROL_MASK, 'h', GETTEXT_PACKAGE },
   { GTK_STOCK_HOME, N_("_Home"), 0, 0, GETTEXT_PACKAGE },
+  { GTK_STOCK_INDENT, N_("Increase Indent"), 0, 0, GETTEXT_PACKAGE },
+  { GTK_STOCK_UNINDENT, N_("Decrease Indent"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_INDEX, N_("_Index"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_ITALIC, N_("_Italic"), 0, 0, GETTEXT_PACKAGE },
   { GTK_STOCK_JUMP_TO, N_("_Jump to"), 0, 0, GETTEXT_PACKAGE },
index 9985a18b731221077fa05fdedf294974c8128f0d..575818c9be36d097b817b7fcae5a09adc9368528 100644 (file)
@@ -100,6 +100,8 @@ void          gtk_stock_item_free (GtkStockItem       *item);
 #define GTK_STOCK_HELP             "gtk-help"
 #define GTK_STOCK_HOME             "gtk-home"
 #define GTK_STOCK_INDEX            "gtk-index"
+#define GTK_STOCK_INDENT           "gtk-indent"                /* since gtk-2.4 */
+#define GTK_STOCK_UNINDENT         "gtk-unindent"      /* since gtk-2.4 */
 #define GTK_STOCK_ITALIC           "gtk-italic"
 #define GTK_STOCK_JUMP_TO          "gtk-jump-to"
 #define GTK_STOCK_JUSTIFY_CENTER   "gtk-justify-center"
index 68aca14ad442e177a334166038d72a3132060175..5e6dcf01fdc2e0ea7ae97ff55fc9b46c59636f92 100644 (file)
@@ -114,6 +114,10 @@ IMAGES = \
        stock_text_strikethrough_24.png \
        stock_text_underline_16.png     \
        stock_text_underline_24.png     \
+       stock_text_indent_16.png        \
+       stock_text_indent_24.png        \
+       stock_text_unindent_16.png      \
+       stock_text_unindent_24.png      \
        stock_top_16.png                \
        stock_top_24.png                \
        stock_trash_16.png              \
@@ -255,6 +259,10 @@ VARIABLES6 = \
        stock_text_strikethrough_24 $(srcdir)/stock_text_strikethrough_24.png \
        stock_text_underline_16 $(srcdir)/stock_text_underline_16.png   \
        stock_text_underline_24 $(srcdir)/stock_text_underline_24.png   \
+       stock_text_indent_16    $(srcdir)/stock_text_indent_16.png      \
+       stock_text_indent_24    $(srcdir)/stock_text_indent_24.png      \
+       stock_text_unindent_16  $(srcdir)/stock_text_unindent_16.png    \
+       stock_text_unindent_24  $(srcdir)/stock_text_unindent_24.png    \
        stock_top_16            $(srcdir)/stock_top_16.png              \
        stock_top_24            $(srcdir)/stock_top_24.png              \
        stock_trash_16          $(srcdir)/stock_trash_16.png            \
diff --git a/gtk/stock-icons/stock_text_indent_16.png b/gtk/stock-icons/stock_text_indent_16.png
new file mode 100644 (file)
index 0000000..4292a2d
Binary files /dev/null and b/gtk/stock-icons/stock_text_indent_16.png differ
diff --git a/gtk/stock-icons/stock_text_indent_24.png b/gtk/stock-icons/stock_text_indent_24.png
new file mode 100644 (file)
index 0000000..cbca4d6
Binary files /dev/null and b/gtk/stock-icons/stock_text_indent_24.png differ
diff --git a/gtk/stock-icons/stock_text_unindent_16.png b/gtk/stock-icons/stock_text_unindent_16.png
new file mode 100644 (file)
index 0000000..ed0f45e
Binary files /dev/null and b/gtk/stock-icons/stock_text_unindent_16.png differ
diff --git a/gtk/stock-icons/stock_text_unindent_24.png b/gtk/stock-icons/stock_text_unindent_24.png
new file mode 100644 (file)
index 0000000..06ce30d
Binary files /dev/null and b/gtk/stock-icons/stock_text_unindent_24.png differ